<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue 数据</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app">
        <button @click="showInfo">click me</button>
        {{name}}
        {{msg}}
    </div>
    <script>
        var vm = new Vue({
            el:'#app',
            data:{
                name:"实例创建成功",
                msg:''
            },
            methods:{
                shouInfo(){
                    this.msg='我被触发了'
                }
            }
        })
        console.log(vm.$data.name)
        console.log(vm.name)
    </script>

</body>
</html>